package org.domain.rescue2011.bean;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;

import es.us.isa.jdbl.domain.biblio.Article;

public class ServicioBean {
	private EntityManagerFactory emf;
	
	public List<Article> getConferencias(){
		
			EntityManager em = emf.createEntityManager();
			em.getTransaction().begin();
			List<Article> result = em.createQuery("from Article where biblioType = 103").getResultList();
			
//			for (Article aux : result){
//				System.out.println(aux.getTitle());
//			}
			
//			Article a = result.get(15);			
//			NoIndexedPublication ni = new NoIndexedPublication(a);			
//			String script = ni.getScript();			
//			System.out.println(script);
					
			em.getTransaction().commit();
			em.close();
			System.out.println("FRANNNNNNNNNNNNNNNNNNNNNNNN");
		
		return result;
		
	}

}
